package org.linkerproject.html;

import java.util.ArrayList;

public class HtmlContainer extends HtmlElement {

	public HtmlContainer() {

	}

	public void addElement(HtmlElement element) {
		container.add(element);
	}

	public void removeElement(HtmlElement element) {
		if (container.contains(element)) {
			container.remove(element);
		}
	}

	@Override
	public String output() {
		StringBuffer temp = new StringBuffer("");
		for (HtmlElement e : container) {
			temp.append(e.output());
		}

		return temp.toString();
	}

	private ArrayList<HtmlElement> container = new ArrayList<HtmlElement>();

}
